#include "stdio.h"
char a[8]="CDEFGAB";
char x[80],y[80];

void tra()
{
int i;
for(i=1;i<=80;i++){
	switch(x[i]){
		'1':y[i]=a[1];break;
		'2':y[i]=a[2];break;
		'3':y[i]=a[3];break;
		'4':y[i]=a[4];break;
		'5':y[i]=a[5];break;
		'6':y[i]=a[6];break;
		'7':y[i]=a[7];break;
	}
}




}


/*Caution: you can only change codes in function above*/

main()
{  int i;
   FILE *fp1, *fp2;
   printf("\n Input:");
   scanf("%s",x);
   tra();
   printf("Result:%s\n",y);


   if ((fp1=fopen("k:\pin2.dat","r"))==NULL)
   { printf("Open file error,Please contact your teacher");
     exit(0);
     };
   if ((fp2=fopen("k:\my.dat","w"))==NULL)
   { printf("!Create file error,Please tell your teacher at once!");
     exit(0);
     };

   fscanf(fp1,"%s",x);
   tra();
   for(i=0;i<9;i++)
       fprintf(fp2,"%c\n",y[i]);

   fclose(fp2);
   fclose(fp1);
}
